﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace TwitterChat
{
    public class ChanelDTO
    {
        public int ChanelId { get; set; }
        public string ChanelName { get; set; }

        public static ChanelDTO CreateFromChanel(Chanel chanelFromDb)
        {
            ChanelDTO newChanel = new ChanelDTO();
            newChanel.ChanelId = chanelFromDb.ChanelId;
            newChanel.ChanelName = chanelFromDb.ChanelName;

            return newChanel;
        }

        public Chanel ConvertToChannel()
        {
            Chanel channel = new Chanel();
            channel.ChanelId = this.ChanelId;
            channel.ChanelName = this.ChanelName;

            return channel;
        }
    }
}